<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript">
        // alert("hello world");
        // document.write("😊");
        // console.log("🐶");

        // /**
        //  * var 标记会进行 提前声明
        //  * /
            var out = "text var"
            document.writeln(out);
            var length = "1234567".length;
            document.writeln(length);
            var isbehaviour = "1234\n567" + 1;
            // alert(isbehaviour)
            document.write(isbehaviour);
            var substring = isbehaviour.substring(2,4);
            var upperCase = isbehaviour.toUpperCase;
            document.writeln(substring,"aaaa");
            var number = 1.56;
            var precision = number.toPrecision(2);
            var precent = number * 100
            document.writeln(precision);
            document.writeln(precent);
            document.writeln(typeof isbehaviour);
            document.writeln(typeof number);
            var numberMax = Number.MAX_VALUE;
            document.writeln(numberMax * 2);
            document.writeln(Number.MIN_VALUE);
            document.writeln(Number.MAX_SAFE_INTEGER);
            var number = 123_456;
            document.writeln(number);
            document.writeln(number/"1");
            document.writeln(number/"a");
            document.writeln(number/"0");
            document.writeln((0.1 + 0.2).toPrecision(2));
            var flag = true;
            var none = null;
            var b;
            console.log(b);

            // to string
            var a = 123;
            b = a.toString()
            console.log(typeof b)
            console.log(b)
            console.log(typeof String(a));
            console.log(String(a));
            var str = "123";  
            console.log(typeof Number(str) );        
            console.log( Number(str) );   
            
            var num = 123;
            num = String(num);
            console.log(typeof num);
            console.log(num);
            
            console.log(typeof String(true));
            console.log( String(true));
            console.log(typeof Number(false));
            console.log(Number(false));
            console.log(typeof Number(null));
            console.log(Number(null));
            console.log(typeof Number(undefined));
            console.log(Number(undefined));
            console.log(typeof Number(""));
            console.log(Number(""));
            console.log(typeof Boolean(null));
            console.log(Boolean(null));

            console.log(typeof Boolean(undefined));
            console.log(Boolean(undefined));


            console.log(typeof Boolean(0.1));
            console.log(Boolean(0.1));

            console.log(typeof Boolean("false"));
            console.log(Boolean("false"));

            console.log(parseInt("123.3eeex222"));
            console.log(parseFloat(".123eeex222.3"));








        
    </script>
    <!-- <script type="text/javascript" src="./js/demo.js"></script> -->
</head>
<body>
    <!-- <button onclick="alert('.....');">👋</button>
    <a href="javascript:alert('.....');">....</a>
    <a href="javascript:;">....|</a> -->
</body>
</html>